package com.generate.tools.conn;

import com.generate.tools.constrant.Constrant;

public class ConnectionFactory {

	public IConnection factory(String type) {
		if (Constrant.ORACLE.equalsIgnoreCase(type)) {
			return new ConnectionOracle();
		} else if (Constrant.MYSQL.equalsIgnoreCase(type)) {
			return new ConnectionMysql();
		}
		throw new NullPointerException("ConnFactory.factory:"+type);
	}

}
